package com.UnionPayCenter.mapper;

import com.UnionPayCenter.operation.entity.ActivityConfig;
import com.UnionPayCenter.operation.entity.ActivityType;
import com.UnionPayCenter.operation.enums.ActivityOperationTypeEnum;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动设置
 */
public interface ActivityConfigMapper {

    int deleteByPrimaryKey(Integer activityConfigId);

    int insert(ActivityConfig record);

    /**
     * 根据店铺Id查询活动配置
     *
     * @param shopId 店铺Id
     * @return 活动配置
     */
    List<ActivityConfig> selectByShopId(Integer shopId);

    ActivityConfig selectByShopIdAndOperateType(@Param("shopId") Integer shopId,
                                                @Param("operationType") ActivityOperationTypeEnum operationTypeEnum);

    /**
     * 根据条件查询活动类型
     *
     * @return 活动类型
     */
    List<ActivityType> selectByCondition(ActivityConfig activityType);

    int updateByPrimaryKeySelective(ActivityConfig record);
}